package gov.nasa.anml.lifted;

import gov.nasa.anml.utility.SimpleFloat;
import gov.nasa.anml.utility.SimpleObject;
import static gov.nasa.anml.lifted.Time.*;

public class Process<T extends SimpleObject<? super T>> extends TimedExpression<T> {
	public Process<T> next;
	public SimpleFloat nextTime = new SimpleFloat(0f); 
	// the next time this interval's status
	// can potentially change
	
	public Process(TimedExpression<T> program) {
		super(program);
	}
	
	public Process(TimedExpression<T> program, Process<T> n) {
		super(program);
		this.next = n;
	}
	
	
	
	public Process<T> clone() {
		Process<T> ret = null;
		try {
			ret = (Process<T>) super.clone();
			// don't make copy of past.  Also don't change the past...
		} catch (CloneNotSupportedException e) {
			// assert false;
		}
		ret.nextTime = ret.nextTime.clone();
		return ret;
	}
	
}

/*
public class IntegerLiteral extends SimpleInteger implements Expression<SimpleInteger> 
	implements Comparable<Literal<T>>, Constant {

	public static int n=0;
	public static HashMap<SimpleObject,Literal<?>> pool;
	public static <T extends SimpleObject> Literal<T> make(T w) {
		Literal<T> probe = (Literal<T>) pool.get(w);
		if (probe == null) {
			probe = new Literal<T>(n++,w);
			pool.put(w,probe);
		}
		return probe;
	}
	
	public int id;
	public T w;

	// what's the difference between not implementing the default constructor
	// and making it private, as far as the outside is concerned?
	//private Literal() {}
	private Literal(int id, T w) {
		this.id = id;
		this.w = w;
	}

	public int compareTo(Literal<T> l) {
		// assert this != null && o != null;
		return this.w.compareTo(l.w);
	}

	@Override
	public boolean equals(Object l) {
		if (l instanceof Literal && id == (((Literal<T>)l).id))
			return true;
		return false;
	}

	@Override
	public int hashCode() {
		return id;
	}

	@Override
	public String toString() {
		return w.toString();
	}

	public T value() {
		return w;
	}

	public T value(State s) {
		return w;
	}

}
*/